import React from 'react';

import { Icon } from 'antd';
import { NoticeBar as NoticeBarAntd } from 'antd-mobile';

import styles from './index.less';

const NoticeBar = ({ children, ...restProps }) => (
    <NoticeBarAntd
        className={styles.noticeBar}
        icon={<Icon type="info-circle" />}
        marqueeProps={{
            loop: true,
            style: { padding: '0 7.5px' }
        }}
        {...restProps}
    >
        {children}
    </NoticeBarAntd>
);

export default NoticeBar;
